<script type="text/javascript">
$(document).ready(function(){
	oTable = $('#data-table-na').dataTable({
	    "bJQueryUI": false,
	    "bAutoWidth": false,
	    "sPaginationType": "full_numbers",
	    "sDom": '<"datatable-header"fl>t<"datatable-footer"ip>',
	    "oLanguage": {
	        "sSearch": "<span>Filtrar:</span> _INPUT_",
	        "sLengthMenu": "<span>Número por página:</span> _MENU_",
	        "oPaginate": { "sFirst": "First", "sLast": "Last", "sNext": ">", "sPrevious": "<" }
	    }
	});
	oTable = $('#data-table-a').dataTable({
	    "bJQueryUI": false,
	    "bAutoWidth": false,
	    "sPaginationType": "full_numbers",
	    "sDom": '<"datatable-header"fl>t<"datatable-footer"ip>',
	    "oLanguage": {
	        "sSearch": "<span>Filtrar:</span> _INPUT_",
	        "sLengthMenu": "<span>Número por página:</span> _MENU_",
	        "oPaginate": { "sFirst": "First", "sLast": "Last", "sNext": ">", "sPrevious": "<" }
	    }
	});
});

</script>
<div id="content">

<!-- Content wrapper -->
	<div class="wrapper">
		<!-- Page header -->
		<div class="page-header">
			<div class="page-title">
				<h5>Conteo de Auditorias</h5>
			</div>
		</div>
		<!-- /page header -->

		<div class="widget">
			<div class="tabbable"><!-- default tabs -->
                <ul class="nav nav-tabs">
                    <li class="active"><a href="#tab1" data-toggle="tab">Auditadas</a></li>
                    <li><a href="#tab2" data-toggle="tab">No Auditadas</a></li>
                </ul>
                <div class="tab-content">
                 
                    <div class="tab-pane active" id="tab1">
                    	<div class="widget">
				            <div class="navbar"><div class="navbar-inner"><h6>Descargar como Excel</h6></div></div>

				            <div class="well">

				                <div class="control-group">
				                    <div class="controls">
				                        <?=  form_open('reportes/excelAudit','id="excelhk"') ?>
				                        <input type="hidden" value="2015-05-01" name="finicial"  />
				                        <input type="hidden" value="2015-05-07" name="ffinal" />
				                        <input type="hidden" value="2" name="ta_tipo_aspi_id" />
				                        <button type="submit" class="btn btn-primary" id="loading" data-loading-text="Generando...">Descargar</button>
				                        <?= form_close() ?>
				                    </div>
				                </div>

				            </div>
				        </div>
                    	<table class="table table-striped table-bordered table-gradient table-hover" id="data-table-a">
							<thead>
							    <tr>
							        <th>Número de Auditorias</th>
							        <th>Unidad</th>
							        <th>Clave Sucursal</th>							        
							        <th>Auditor</th>
							    </tr>
							</thead>
							<tbody>
							    <?php foreach ($listaAuditadas as $c) { ?>
							        <tr>
							            <td><?= $c->nAuditorias ?></td>
							            <td><?= $c->sucursal ?></td>
							            <td><?= $c->claveSuc ?></td>
							            <td><?= $c->auditor ?></td>
							        </tr>
							    <?php } ?>          
							</tbody>
						</table>
                    	<!-- Form related buttons -->
				        
				        <!-- /form related buttons -->
                    </div>
                    
                    <div class="tab-pane" id="tab2">
                    	<div class="widget">
				            <div class="navbar"><div class="navbar-inner"><h6>Descargar como Excel</h6></div></div>

				            <div class="well">

				                <div class="control-group">
				                    <div class="controls">
				                        <?=  form_open('reportes/excelAuditNo','id="excelhk"') ?>
				                        <input type="hidden" value="2015-05-01" name="finicial"  />
				                        <input type="hidden" value="2015-05-07" name="ffinal" />
				                        <input type="hidden" value="2" name="ta_tipo_aspi_id" />
				                        <button type="submit" class="btn btn-primary" id="loading" data-loading-text="Generando...">Descargar</button>
				                        <?= form_close() ?>
				                    </div>
				                </div>

				            </div>
				        </div>
	                    <table class="table table-striped table-bordered table-gradient table-hover" id="data-table-na">	             		
							<thead>
							    <tr>
							        <th>Unidad</th>
							        <th>Clave Sucursal</th>
							        <th>Auditor</th>
							    </tr>
							</thead>
							<tbody>
							    <?php foreach ($listaNoAuditadas as $na) { ?>
							        <tr>
							            <td><?= $na->sucursal ?></td>							            
							            <td><?= $na->claveSuc ?></td>
							            <td><?= $na->auditor ?></td>
							        </tr>
							    <?php } ?>          
							</tbody>
						</table>
                    </div>
                
                </div>
            </div>
		</div>
		<!-- /widget -->

		</div>
		<!-- /content wrapper -->

</div>
<!-- /content -->